Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: store multiple double spend attempts #1909

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

RolandSherwin
Copy link
Member

No description provided.

let mut txs = BTreeSet::new();
for spend in spends.into_iter() {
txs.insert(spend.spend.spent_tx.clone());
spend_processing
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier only the first spend was sent for spend_processing, but here we do it for all the spends, is this alright?

@RolandSherwin RolandSherwin force-pushed the store_more_double_spends branch from 82f23e3 to 86edf7a Compare June 20, 2024 09:50
spend_processing
.send(first_spend.clone())
.await
.map_err(|e| WalletError::SpendProcessing(e.to_string()))?;

// use iteration instead of recursion to avoid stack overflow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment not relevant anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is for the one inside the for loop? I'm not sure.

@RolandSherwin RolandSherwin force-pushed the store_more_double_spends branch from 86edf7a to c595c80 Compare June 20, 2024 20:54
@RolandSherwin RolandSherwin changed the title fix: store multiple doulbe spend attempts fix: store multiple double spend attempts Jun 20, 2024
@RolandSherwin RolandSherwin force-pushed the store_more_double_spends branch from c595c80 to d37ce9d Compare June 20, 2024 20:57
@RolandSherwin RolandSherwin added this pull request to the merge queue Jun 22, 2024
Merged via the queue into maidsafe:main with commit ec2494a Jun 22, 2024
40 checks passed
@RolandSherwin RolandSherwin deleted the store_more_double_spends branch June 22, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants